

#include <deque>
#include <iostream>

using namespace std;

void demo1(){
    deque<int> dq(5);
    dq.push_back(6);
    dq.push_front(4);
    for(auto it = dq.begin(); it != dq.end(); it++){
        cout<<*it<<",";
    }
    cout << endl;
}

void demo2(){
    deque<int> dq(1, 99);
    dq.push_back(5);
    dq.push_back(4);
    
    cout<<dq.front();
    dq.pop_front();

    cout<<dq.front();
    dq.pop_front();

    for(auto it = dq.begin(); it != dq.end(); it++){
        cout<<*it<<",";
    }
    cout << endl;

}

int main(){
    
    demo2();



    return 0;
}